#include <iostream>

#include <sys/types.h> 
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <memory>

#include "Common.hpp"
#include "TcpClient.hpp"
#include "MyPthread/Log.hpp"
using namespace LogModule;

int main(int argc, char *argv[])
{
    ENABLE_CONSOLE_LOG();
    if(argc <=1)
    {
        std::cerr << "Usage: " << argv[0] << " server_ip"<< " server_port" << std::endl;
        Die(USAGE_ERR);
    }



    std::shared_ptr<TcpClient> client =std::make_shared<TcpClient>
    (std::string(argv[1]),std::stoi(argv[2]));


    client->InitClient();
    client->Start();
    
    return 0;
}